package com.zzedu.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zzedu.domain.ZzPictureBook;
import com.zzedu.dto.QueryZzPictureBookDTO;
import com.zzedu.dto.ZzPictureBookDTO;
import com.zzedu.params.ZzPictureBookParams;
import com.zzedu.vo.ZzPictureBookVO;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 课程管理Service接口
 *
 * @author Mr.Wang
 * @date 2025-04-04
 */
public interface IZzPictureBookService extends IService<ZzPictureBook> {
    /**
     * 构造查询条件
     */
    public LambdaQueryWrapper<ZzPictureBook> buildQuery(ZzPictureBookDTO zzPictureBookDTO);

    public List<ZzPictureBookVO> convertVO(List<ZzPictureBook> zzPictureBooks);

    /**
     * 保存绘本
     *
     * @param zzPictureBookParams
     * @return
     */
    public boolean save(ZzPictureBookParams zzPictureBookParams) throws Exception;

    public ZzPictureBookParams selectById(Long id);

    /***
     * 根据unitId 列表获取绘本
     * @param unitIdList
     * @return
     */
    List<ZzPictureBook> getZzPictureBookByUnitList(List<Long> unitIdList);

    /**
     * 根据当前学生#查询课表信息
     *
     * @param page
     * @param schoolId
     * @return
     */
    public IPage<QueryZzPictureBookDTO> apiQueryZzPictureBookPage(IPage<QueryZzPictureBookDTO> page, Long stuId, Long schoolId, Long unitId);

    /**
     * 班级
     *
     * @param page
     * @param schoolId
     * @param clzzId
     * @param now
     * @return
     */
    public IPage<ZzPictureBook> apiClassQueryZzPictureBookPage(
            IPage<ZzPictureBook> page,
            Long schoolId,
            Long clzzId,
            LocalDateTime now
    );

    /**
     * 按照 作业发送逻辑查询绘本列表
     * @param page
     * @param stuId
     * @param schoolId
     * @param unitId
     * @return
     */
    IPage<ZzPictureBook> apiQueryZzPictureBookPageNews(IPage<QueryZzPictureBookDTO> page, Long stuId, Long schoolId, Long unitId);

    /**
     * 大屏#查询所有绘本列表
     *
     * @param page
     * @param stuId
     * @param schoolId
     * @param unitId
     * @return
     */
    public  IPage<ZzPictureBook> apiDeviceZzPictureBookQueryPageNews(IPage<ZzPictureBook> page, String level,  Long schoolId,  Long unitId,List<Integer> stateList);
    /**
     * 小程序#查询所有绘本列表
     *
     * @param page
     * @param stuId
     * @param schoolId
     * @param unitId
     * @return
     */
    public  IPage<ZzPictureBook> apiMiniProZzPictureBookQueryPageNews(IPage<ZzPictureBook> page, String level,  Long schoolId,  Long unitId,List<Integer> stateList);
}
